{extend name="public:common_index"/}
{block name="main"}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> {$title}</h3>
        </div>
        <div class="panel-body">
            <div class="navbar navbar-default">
                <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">
                    <div class="form-group">
                        <label class="control-label" for="input-order-id">MIYO ID</label>
                        <div class="input-group">
                            <input type="text" name="uuid" value="{$Think.get.uuid}" placeholder="MIYO ID"
                                   class="form-control">
                        </div>
                        <label class="control-label" for="input-order-id">用户昵称</label>
                        <div class="input-group">
                            <input type="text" name="nick_name" value="{$Think.get.nick_name}" placeholder="用户昵称"
                                   id="input-order-id" class="form-control">
                        </div>
                        <label class="control-label" for="input-order-id">状态</label>
                        {:arr2select('status',$status,'',$getStatus,'status','msg')}
                        <div class="form-group">
                            <label class="control-label" for="input-order-id">时间筛选</label>
                            <div class="input-group">
                                <input type="text" name="startDate"  autocomplete="off" value="{$Think.get.startDate}" placeholder="选择开始时间"
                                       class="form-control timepicker">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <input type="text" name="endDate"  autocomplete="off" value="{$Think.get.endDate}" placeholder="选择结束时间"
                                       class="form-control timepicker">
                            </div>
                        </div>
                    </div>
                    <!--<div class="form-group">-->
                    <!--<label class="control-label" for="input-order-id">时间筛选</label>-->
                    <!--<div class="input-group">-->
                    <!--<input type="text" name="startDate"  autocomplete="off" value="{$Think.get.startDate}" placeholder="选择开始时间"-->
                    <!--class="form-control timepicker">-->
                    <!--</div>-->
                    <!--</div>-->
                    <!--<div class="form-group">-->
                    <!--<div class="input-group">-->
                    <!--<input type="text" name="endDate"  autocomplete="off" value="{$Think.get.endDate}" placeholder="选择结束时间"-->
                    <!--class="form-control timepicker">-->
                    <!--</div>-->
                    <!--</div>-->
                    <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                            id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                    </button>
                    <input type="hidden" name="download" >
                    <button type="submit" id="download" class="btn btn-primary"><i class="fa fa-search"></i> 下载
                    </button>
                    <br />
                    <lable>统计额:{$total}</lable>
                </form>
            </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>ID</td>
                                <td>MIYO ID</td>
                                <td>用户昵称</td>
                                <td>提现金额(元)</td>
                                <td>应到账金额(元)</td>
                                <td>应扣除手续费(元)</td>
                                <td>账号</td>
                                <td>提现类型</td>
                                <td>提现方式</td>
                                <td>状态</td>
                                <td>提现申请时间</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row" }
                            <tr>
                                <td>{$row.b_id}</td>
                                <td>{$row.uuid}</td>
                                <td>{$row.nick_name}</td>
                                <td>{:div($row.money)}元</td>
                                <td>{:div($data.cash)}元</td>
                                <td>{:div($data.ratio_money)}元({$data.ratio}%)</td>
                                <td>{$data.account}</td>
                                <td>
                                    {switch name="$row.acType"}
                                    {case value="1"}银行卡{/case}
                                    {case value="2"}支付宝{/case}
                                    {default /}未知类型
                                    {/switch}
                                </td>
                                <td>{$status[$row.status]['msg']}</td>
                                <td>{$row.create_time}</td>
                                <td>
                                    {if condition="$row.status == 2"}
                                        <span class="btn btn-primary check_del" data-message="通过审核?" data-url="{:url('edit',['id'=>$row.b_id,'status'=>1])}">通过</span>
                                        <span class="btn btn-danger check_del" data-message="拒绝审核?" data-url="{:url('edit',['id'=>$row.b_id,'status'=>0])}">拒绝</span>
                                        <!--<a class="btn btn-primary " href="{:url('money/edit',['id'=>$row.b_id])}">审核</a>-->
                                    {else /}
                                        <!--<a class="btn btn-primary " href="{:url('money/edit',['id'=>$row.b_id])}">查看详情</a>-->
                                    {/if}
                                    <a class="btn btn-primary" onclick="openUri('/user/detail/id/{$row.user_id}')"  >用户资金明细</a>
                                </td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>
{/block}

{block name="js"}
<script>

    $("#download").click(function () {
        $("input[name='download']").val('download');
        document.getElementById('search-form2').submit();
    });


    $(function () {
        var type   = "{$Think.get.type}";
        if(type != ''){
            $('#type'+type).attr('selected',true)
        }

        var status   = "{$Think.get.status}";
        if(status != ''){
            $('#status'+status).attr('selected',true)
        }
    })

</script>



{/block}



